<template>
    <view>

        <view>
            <image src="/static/logo.png" style="width: 100%;height: 200px"></image>
            <view style="position: absolute; top: 0; left: 0; width: 100%">
                <view style="text-align:center; margin-top: 10px;margin-bottom: 40px;font-size: 16px;color: white">平远首页</view>
                <view class="uni-flex">
                    <label style="flex: 1">你好!</label>
                    <view style="flex: 1;text-align: right">
                        <view>23°C</view>
                        <view>东南风</view>
                    </view>
                </view>
            </view>
        </view>

        <view>
            <swiper class="swiper"
                    indicator-dots="true"
                    autoplay="true"
                    interval="5000"
                    duration="1500"	>
                <swiper-item v-for="(item , k) in bannerModel" :key="k">
                    <image :src="item" mode="aspectFill"></image>
                </swiper-item>
            </swiper>
        </view>

        <uni-notice-bar single="true" text="[单行] 这是 NoticeBar 通告栏，这是 NoticeBar 通告栏，这是 NoticeBar 通告栏"></uni-notice-bar>

        <view class="uni-flex">
            <view v-for="(item, index) in homePartitionModel" :key="index" style="flex: 1;text-align:center">
                <view>{{item.title}}</view>
                <view>{{item.subTitle}}</view>
            </view>
        </view>

        <view>
            <image v-for="(item, k) in itemModel" :key="k" :src=item style="width:45%;height: 100px;padding-left: 3.3%"></image>
        </view>

    </view>
</template>
uni-notice-bar.vue
<script>
    import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue'
    export default {
        name: "home",
        components: {
            uniNoticeBar
        },
        data() {
            return {
                bannerModel:["/static/logo.png","/static/logo.png","/static/logo.png"],
                homePartitionModel:{
                    1:{title:'周边服务',subTitle:'舒适满意'},
                    2:{title:'智慧景区',subTitle:'山清水秀'},
                    3:{title:'平远资讯',subTitle:'快乐出行'}
                },
                itemModel:["/static/logo.png","/static/logo.png","/static/logo.png","/static/logo.png"],

            }
        },
        onLoad() {
            this.$http.banner({type:0}).then(({data})=>{
                console.log(data)
            })
        },
        methods: {

        },

    }
</script>

<style>


</style>
